<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Payment Success</title>
  <script src="./js/jquery-3.2.1.min.js"></script>
  <script src="./js/bootstrap.bundle.min.js"></script>
</head>

<body>
  <h1>Payment Successful!</h1>
  <p>Thank you for your purchase.</p>
  <button type="button" class="btn btn-danger">返回首页</button>
  <script>
    window.onload = function () {
      // 当支付成功之后立即销毁户号，返回首页从新生成户号
      localStorage.removeItem('huhao')
    }
    
    $('.btn-danger').click(function() {
      window.open('./index.html','_self')
    })

  </script>

</body>

</html>